﻿using System;
using Microsoft.Practices.Prism.Regions;
using Infrastucture;
using Infrastucture.Controllers;

namespace TimeSplicerModule.Controllers
{
    public interface IApplicationRoleController : IController
    { }

    public class ApplicationRoleController : Controller, IApplicationRoleController
    {
        public void NavigateToListView()
        {
            Uri uri = new Uri(typeof(Views.ApplicationRoleListView).Name, UriKind.Relative);
            RegionManager.RequestNavigate(RegionNames.MainRegion, uri);
        }

        public void NavigateToItemView()
        {
            Uri uri = new Uri(typeof(Views.ApplicationRoleView).Name, UriKind.Relative);
            RegionManager.RequestNavigate(RegionNames.MainRegion, uri);
        }

        public void NavigateToItemView(Guid itemGuid)
        {
            Uri uri = new Uri(typeof(Views.ApplicationRoleView).Name + "?applicationRoleGuid=" + itemGuid.ToString(), UriKind.Relative);
            RegionManager.RequestNavigate(RegionNames.MainRegion, uri);
        }
    }
}
